1. Field of the Invention
This invention relates to a portable electronic device such as an IC card which performs a process according to a command supplied from an external device, for example, and a control method of the portable electronic device.
2. Description of the Related Art
Conventionally, a portable electronic device such as an IC card performs a process for accessing data stored in a nonvolatile memory as a process performed according to a command supplied from an external device. In the nonvolatile memory of the portable electronic device such as the IC card, various files used to store various data items are defined. For example, in the IC card, files such as MF, DF, EF are managed in a hierarchical structure. Generally, in the IC card of the above file structure, real data is stored in the EF of the nonvolatile memory (for example, refer to Jpn. Pat. Appln. KOKOKU Publication No. 2695857).
Further, in the above operating condition of the IC card, the IC card performs a process according to a command supplied from an IC card processing equipment (external device). For example, the IC card controls access to data items in the nonvolatile memory according to a command which requests access to data stored in the nonvolatile memory.
In addition, the IC card is required to have adequate security for access to respective data items in the nonvolatile memory. Therefore, it is not preferable to unconditionally access data according to a command supplied from an external device. For example, the technique for controlling access to each file according to each command based on the access condition set for each file is disclosed in Jpn. Pat. Appln. KOKAI Publication No. H8-263353. In other words, with the technique described in Jpn. Pat. Appln. KOKAI Publication No. H8-263353, the IC card performs a control operation to permit access to a file which satisfies a preset access condition.